package proteinprediction.arffgenerator;

public class Main {
	public static void main(String[] args) {
		AbstractArffGenerator generator = createNewArffGenerator(args);
		generator.generateArff();
	}
	
	private static AbstractArffGenerator createNewArffGenerator(String[] args) {
		AbstractArffGenerator result;
		if (args.length == 3) {
			result = new NewStructureArffGenerator(args[0], args[1], args[2]);
		} else if (args.length == 2){
			result = new NewStructureArffGenerator(args[0], args[1], "");
		} else {
			throw new RuntimeException();
		}
		return result;
	}

	public static AbstractArffGenerator createOldArffGenerator(String[] args) {
		AbstractArffGenerator result;
		if (args.length == 4) {
			result = new OldArffGenerator(args[0], args[1], args[2], args[3]);
		} else if (args.length == 3){
			result = new OldArffGenerator(args[0], args[1], args[2], "");
		} else {
			throw new RuntimeException();
		}
		return result;
	}
}
